using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using BA.DAL;
using Microsoft.VisualBasic;

namespace BlazeApps.Library.Menus
{
    public class MenuList : Base
    {
        private BA.DAL.DBUtility DAL = new BA.DAL.DBUtility();
        private Procedures Procs = new Procedures();

        public DataSet GetMenuList()
        {
            DAL.CreateDBObjects(ConnectionString, Provider);

            return DAL.GetDataSet(Procs.ListMenus.ToString().Trim(), System.Data.CommandType.Text, System.Data.ConnectionState.Open);
        }

        public DataSet GetMenuList(string ID)
        {
            DAL.CreateDBObjects(ConnectionString, Provider);

            DAL.AddParameter("@id", ID);

            return DAL.GetDataSet(Procs.ListMenusByID.ToString().Trim(), System.Data.CommandType.Text, System.Data.ConnectionState.Open);
        }
    }
}